The standard note event ( Figure 5 ) supports most music requirements. The note event allows up to 32 parts, numbered 0 to 31, and support pitches from 2 octaves below middle C to 3 octaves above. The extended note event ( Figure 6 ) provides a wider range of pitch values, microtonal values to define any pitch, and extended note duration. The extended note event requires two long words; the standard note event requires only one.
Table 2 Contents of a note event
The part number bit field contains the unique part identifier initially used during the TuneSetHeader call.
The pitch bit field allows a range of 0-63, which is mapped to the values 32-95 representing the traditional equal tempered scale. For example, the value 28 (mapped to 60) is middle C.
The velocity bit field allows a range of 0-127. A velocity value of 0 produces silence.
The duration bit field defines the number of units of time during which the part will play the note. The units of time are defined by the media time scale or tune player time scale.
Use this macro call to stuff the note event's long word:
qtma_StuffNoteEvent(x, instrument, pitch, volume, duration)
Use these macro calls to extract fields from the note event's long word:
qtma_Instrument(x)
qtma_NotePitch(x)
qtma_NoteVelocity(x)
qtma_NoteVolume(x)
qtma_NoteDuration(x)
Table 3 Contents of an extended note event
The part number bit field contains the unique part identifier initially used during the TuneSetHeader call.
If the pitch bit field is less than 128, it is interpreted as an integer pitch where 60 is middle C. If the pitch is 128 or greater, it is treated as a fixed pitch.
Microtonal pitch values are produced when the 15 bits of the pitch field are split. The upper 7 bits define the standard equal tempered note and the lower 8 bits define 256 microtonal divisions between the standard notes.
Use this macro call to stuff the extended note event's long words:
qtma_StuffXNoteEvent(w1, w2, instrument, pitch, volume, duration)
Use these macro calls to extract fields from the extended note event's long words:
qtma_XInstrument(m, l)
qtma_XNotePitch(m, l)
qtma_XNoteVelocity(m, 1)
qtma_XNoteVolume(m, l)
qtma_XNoteDuration(m, l)
| Previous | Chapter Contents | Chapter Top | Next |